package o;

import android.database.ContentObserver;
import android.os.Handler;
import android.provider.Settings.Global;
import com.huawei.appmarket.oobe.app.OOBESupportService;

public class dls {
    static b ˋ = new b(null);

    static class b extends ContentObserver {
        public b(Handler handler) {
            super(handler);
        }

        public boolean deliverSelfNotifications() {
            return true;
        }

        public void onChange(boolean z) {
            super.onChange(z);
            try {
                int i = Global.getInt(ContentManager.getInstant().getContext().getContentResolver(), "device_provisioned");
                Logger.ˎ("OOBE", "OOBESetupWizardMonitor.onChange result=" + i);
                if (i == 1) {
                    OOBESupportService.stopService();
                    dls.ˊ();
                }
            } catch (Exception e) {
                Logger.ˋ("OOBE", "onChange Exception:" + e.getMessage());
            }
        }
    }

    public static void ॱ() {
        ContentManager.getInstant().getContext().getContentResolver().registerContentObserver(Global.getUriFor("device_provisioned"), false, ˋ);
    }

    public static void ˊ() {
        ContentManager.getInstant().getContext().getContentResolver().unregisterContentObserver(ˋ);
    }
}
